#!/bin/bash -i
srcPath=/data/program/vue/ubt-rbac-web
dstPath=/opt/apps/ubt-rbac
echo "Build the project Begin!"
echo "Go into the srouce path of project directory: $srcPath"
cd $srcPath
echo "Update the New Program."
git pull
echo "Check and update the go libs."
yarn
echo "Build the project."
yarn build
echo "Delete the old program."
rm -rf $dstPath/dist/
echo "Move the executed file to $dstPath"
mv dist/ $dstPath/
echo "Build the project finished!"

